All Questions
Tagged with ecmascript-6interview-questions
15 questions
3votes
2answers
197views
Check for max value in stack
Got this problem in a coding interview - Get the max value of a stack in O(1). The stack contains numbers only. Please review my solution. ...
4votes
1answer
218views
Randomly rearrange table rows without unnecessary reflows
I recently completed a coding challenge for a company that did not get me to the next stage. They were kind enough to provide the following feedback: The coding assignment does not match what we are ...
2votes
5answers
258views
FizzBuzz solution
I'm preparing for junior developer interviews and am trying to come up with a more interesting/versatile solution to FizzBuzz than I've done in the past. Do you have any ideas of how I might DRY this ...
4votes
3answers
618views
Microsoft OA | Longest Substring Without 3 Contiguous Occurrences of Letter
For the following question, does my JS Solution seem correct? I'm looking for some peer review. Q: Given a string s containing only a and b, find longest substring of s such that s does not contain ...
-1votes
2answers
708views
Two-sum solution in JavaScript [closed]
I was given this question during an interview. It is similar to two sum problems and I would like to ask for feedback for my solution. Merging 2 Packages Given a package with a weight limit ...
6votes
2answers
305views
Find top two clothing sizes in the array
I was recently asked this question in an interview. Here is the solution I came up with. Please let know if I could have done this differently or in a more efficient manner. The question is as ...
0votes
1answer
264views
Custom indexOf for strings javascript with regex
I was wondering how efficient my code is creating custom indexOf for strings in JavaScript using regex instead of looping with a for statement the whole way in most ...
5votes
5answers
2kviews
Average of two hex colour values
I have submitted the following bit of script as the answer to one of the tasks I was set by a recruiter. My submission has already been made and cannot be altered. However, I am keen to ask how you ...
3votes
4answers
783views
Find the longest length of sequence of 1-bits achievable by flipping a single bit from 0 to 1 in a number
Problem Statement The problem is defined in the book as following: 5.3 You have an integer and you can flip exactly one bit from 0 to ...
6votes
1answer
1kviews
Multiple stacks implemented via a linked lists on top of single fixed-size array
Problem Statement Originally, the problem is defined in the book as following: Describe how you could use a single array to implement three stacks. — Cracking the Coding Interview (6th edition) ...
4votes
1answer
82views
Code improvements for React App
This was my code challenge for a Junior JavaScript Developer position. The app is mostly running error-free, but I was rejected for the role, so I assume there were major issues with my code and have ...
4votes
1answer
290views
OOP air conditioner model
I had a phone interview and we shared a screen to do a simple challenge. Instructions were ambiguous but I basically had to implement how an air conditioner would work in general. I wrote the ...
3votes
1answer
756views
Code to call Space X API and display results
This is a technical test from a job interview. The feedback was that although it does as asked, the application structure wasn't great. As a beginner I'm not entirely sure what's wrong with it and ...
11votes
1answer
168views
Wandering water ways
An entry for the August 2016 Community Challenge I slightly modified the input and output to suit the snippet tool, and also because I really like the mapped output with the basins. I have been ...
2votes
2answers
223views
Returning a filtered list of iPhones
I have just received feedback regarding a junior dev test that I submitted. It was unfortunately not great, and the recruiter could not articulate the issues, I tried to show that I was thinking about ...